package com.hr.reactive.common;

import reactor.netty.http.client.HttpClient;
import reactor.netty.resources.LoopResources;

public class AbstractHttpClient {
    private static final String BASE_URL="https://extinguisher.seawayos.com/gateway/data";
    protected final HttpClient httpClient;

    public AbstractHttpClient() {
        //默认情况下 反应器会为每个cpu创建一个线程
        LoopResources   loopResource= LoopResources. create("huran",1,true);
        this.httpClient = HttpClient.create().runOn(loopResource).baseUrl(BASE_URL);
    }
}
